package org.codeblue.support.exceptions;

/**
 * Created by jl.hu on 2017/3/28.
 */
public class BusinessException extends RuntimeException {
    protected String errorCode;
    protected String customMsg;

    public String getCustomMsg() {
        return customMsg;
    }

    public void setCustomMsg(String customMsg) {
        this.customMsg = customMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    private static final long serialVersionUID = 1L;

    public BusinessException() {
        super();
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(String errorCode) {
        super();
        this.errorCode = errorCode;
    }

    public BusinessException(String errorCode, String message) {
        super(message);
        this.customMsg = message;
        this.errorCode = errorCode;
    }

    public BusinessException(String errorCode, Throwable cause) {
        super(cause);
        this.errorCode = errorCode;
    }

    public BusinessException(String errorCode, String message, Throwable cause) {
        super(message, cause);
        this.customMsg = message;
        this.errorCode = errorCode;
    }
}